<?php
/* --------------------------------------------------------------
   daparto.php 2010-07-29 gm
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2010 Gambio GmbH
   Released under the GNU General Public License
   --------------------------------------------------------------
*/
?><?php
class Daparto{
	var $v_partnerlink;
	var $v_export_type;
	var $v_module_name;
	var $v_module_homepage;
	var $v_module_format;
	var $v_module_export_filename;
	var $v_filename;
	var $v_keyname;
	var $v_linkname;
	var $v_delimiter;
	var $v_enclosure;

	var $v_field_filename;
	var $v_field_customers_groups;
	var $v_field_currency;
	var $v_field_shipping_costs;
	var $v_field_shipping_costs_free;
	var $v_field_attributes;
	var $v_field_campaign;
	var $v_field_export;

	function Daparto() {
		$this->formSettings();
	}

	function formSettings(){
		$this->v_partnerlink='';
		$this->v_export_type='comparison';
		$this->v_module_name='Daparto.de';
		$this->v_module_homepage='www.daparto.de';
		$this->v_module_format='csv';
		$this->v_module_export_filename='daparto.csv';
		$this->v_filename='daparto.php';
		$this->v_keyname='DAPARTO';
		$this->v_linkname='daparto';
		$this->v_delimiter=";";
		$this->v_enclosure="'";

		$this->v_field_filename=true;
		$this->v_field_customers_groups=true;
		$this->v_field_currency=true;
		$this->v_field_shipping_costs=true;
		$this->v_field_shipping_costs_free=true;
		$this->v_field_attributes=true;
		$this->v_field_campaign=true;
		$this->v_field_export=true;
	}

	function formAddOn(){

	}

	function formatResults($p_products_array){
    $p_products_array['products_condition']='1';
    $p_products_array['products_in_change']='1';
    $p_products_array['products_offer_type']='1';
    $p_products_array['tecDoc']='0';
    $p_products_array['products_price']=number_format( (double)$p_products_array['products_price'], 2, ',', '');
		$p_products_array['products_shipping_costs']=number_format( (double)$p_products_array['products_shipping_costs'], 2, ',', '');
		$p_products_array['manufacturers_name_number']= $p_products_array['manufacturers_name'].','.$p_products_array['products_model'];
		$p_products_array['products_weight']=number_format( (double)$p_products_array['products_weight'], 2, ',', '');
		return($p_products_array);
	}

	function exportScheme(){
		$t_csv_fields_array=array();
		$t_csv_fields_array['products_name']= 'Artikelbezeichnung';
    $t_csv_fields_array['manufacturers_name_number']= 'Teilehersteller,Teilenummer';
    $t_csv_fields_array['manufacturers_alt_name_number']='Vergleichs-Teilehersteller,Vergleichs-Teilenummern';
    $t_csv_fields_array['products_ean']='Verwendung';
    $t_csv_fields_array['products_price']= 'Preis';
    $t_csv_fields_array['products_id']= ' Artikel-Nummer im Shop des Anbieters';
    $t_csv_fields_array['products_image_1']= 'Artikelfoto';
    $t_csv_fields_array['products_description']= 'Artikelbeschreibung';
    $t_csv_fields_array['products_link']= 'Link zum Shop';
    $t_csv_fields_array['products_condition']= 'Zustand';
    $t_csv_fields_array['products_in_change']='Im Austausch';
    $t_csv_fields_array['products_offer_type']='Angebotsformat';
    $t_csv_fields_array['products_shipping_costs']= 'Versandklasse';
    $t_csv_fields_array['products_weight']='Gewicht';
    $t_csv_fields_array['tecDoc']=' TecDoc Daten';
		return($t_csv_fields_array);
	}

}
?>